for (i = 0; i < ifd->count; i++) {
exif_tag_t* tag;
- offs = gbftell(fin);
tag = (exif_tag_t*) xcalloc(sizeof(*tag), 1);
+#ifdef EXIF_DBG
+ tag->offs = offs;
+ offs = gbftell(fin);
+#endif
ENQUEUE_TAIL(&ifd->tags, &tag->Q);
tag->count = gbfgetuint32(fin);
tag->size = exif_type_size(tag->type) * tag->count;
tag->data = &tag->value;
-#ifdef EXIF_DBG
- tag->offs = offs;
-#endif
if (BYTE_TYPE(tag->type) && (tag->count <= 4)) {
gbfread(tag->data, 4, 1, fin);
int fix, hms;
route_head* route;
Waypoint* wpt, *lastwpt=NULL;
- double long_old,lat_old;
+ double lat_old;
char tbuffer[64];
struct tm tm2;
- long_old=0;
lat_old=0;
strftime(routename,sizeof(routename),"Tracklog %c",gmtime(&tx));
if ((wpt->fix != fix_none)&&(lat_old==0)) { //first-time init
lat_old=wpt->latitude;
- long_old=wpt->longitude;
//route_add_wpt(route, wpt);
lastwpt=wpt;
}
fprintf(stderr,"valid line %5lu: \"%s\" %lf km/h\n",line,buff,speed);
}
lastwpt=wpt;
- long_old=wpt->longitude;
lat_old=wpt->latitude;
route_add_wpt(route,wpt);
waypt_add(new Waypoint(*wpt));
return;
}
- i = sprintf(nbuf, "PMGNCSM,%02X", osum);
+ (void) sprintf(nbuf, "PMGNCSM,%02X", osum);
nsum = mag_checksum(nbuf);
i = sprintf(obuf, "$%s*%02X\r\n",nbuf, nsum);
QString
mag_find_descr_from_token(const char* token)
{
- icon_mapping_t* i = icon_mapping;
-
if (icon_mapping == NULL) {
return "unknown";
}
- for (i = icon_mapping; i->token; i++) {
+ for (icon_mapping_t* i = icon_mapping; i->token; i++) {
if (token[0] == 0) {
break;
}
route_head* rte;
route_head* trk;
- char recType;
+ char recType = -1;
int reclen;
/* TODO: This kills a compiler warning but I'm not sure it's right */
int reclen2 = 0;
char* i = ibuf;
sym_col = 0;
- for (col = 0, i = ibuf; *i; col++, i++) {
+ for (col = 0; *i; col++, i++) {
if (0 == case_ignore_strncmp(i, "comment", 7)) {
comment_col = col;
}